<template>
  <div>
    <div class="shop">
      <div class="shop-header">
        <div class="background">
          <img :src="seller.avatar" alt="">
        </div>
        <div class="back">
          <router-link to="/index" tag="span" class="icon iconfont icon-jiantou"></router-link>
        </div>
        <div class="shop-content">
          <img :src="seller.avatar" alt="">
          <div class="shop-info">
            <div class="info-title">
              {{seller.name}}
            </div>
            <div class="info-delivery">
              {{seller.description}} / {{seller.deliveryTime}}分钟送达 / 配送费￥{{seller.deliveryPrice}}
            </div>
            <div class="info-notice">
              公告：欢迎光临，用餐高峰期请提前下单，谢谢。
            </div>
          </div>
        </div>
        <div class="shop-footer">
          新用户下单立减17.0元(不与其它活动同享)
        </div>
      </div>
      <div class="tab">
        <div class="tab-shop"><span class="borders">商品</span></div>
        <div class="tab-pin"><span>评价</span></div>
      </div>
       <shoped></shoped>

    </div>
  </div>
</template>
<script>
  import shoped from '@/components/shoped'

  export default{
      components:{
        shoped
      },
    data(){
      return {
        seller: {
          type: Array
        }
      }
    },
    mounted(){
      let idx = this.$route.params.idx
      this.axios.get('http://localhost:8080/api/seller').then((res) => {
        let sellers = res.data.data
        this.seller = sellers[idx]
      })
    }
  }
</script>
<style lang="less" scoped>
  @import '../../static/less/var.less';

  .shop-header {
    height: @base*263rem;
    position: relative;
    background: rgba(191, 184, 199, 0.5);

    .background {
      width: 100%;
      height: 100%;
      overflow: hidden;
      position: absolute;
      top: 0;
      left: 0;
      z-index: -1;
      filter: blur(10px);
      img {
        width: 100%;

      }
    }
    .back {
      height: @base*55rem;
      padding: @base*8rem @base*20rem;
      span {
        color: #fff;
        font-size: @base*40rem;
        font-weight: bold;
      }
    }
    .shop-content {
      height: @base*132rem;
      display: flex;
      justify-content: space-between;
      img {
        width: @base*128rem;
        height: @base*128rem;
        margin: 0 @base*20rem;
        border: 1px solid #fff;
        border-radius: 10px;
      }
      .shop-info {
        display: flex;
        flex-direction: column;
        color: #fff;
        font-size: @base*20rem;
        .info-title {
          height: @base*42rem;
          line-height: @base*42rem;
          font-size: @base*40rem;
        }
        .info-delivery {
          height: @base*50rem;
          line-height: @base*50rem;
        }
        .info-notice {
          height: @base*40rem;
          line-height: @base*40rem;
        }
      }
    }
    .shop-footer {
      height: @base*32rem;
      color: #fff;
      font-size: @base*20rem;
      line-height: @base*32rem;
      margin-left: @base*20rem;
      margin-top: @base*15rem;
    }
  }
  .tab{
    width:100%;
    height:@base*91rem;
    display: flex;
    background: #fff;
     div{
       width:50%;
       text-align: center;
       color: #999;
       font-size: @base*30rem;
       line-height: @base*91rem;
     }
     .borders{
       border-bottom: 1px solid #0094FF;
       padding-bottom:@base*20rem;
     }

  }

</style>
